/**
 * Description:
 * Class Name:LinkedListTest
 * Date:2022/3/5 16:52
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第8章_Java集合._8_5_Queue集合._8_5_3_LinkedList实现类;

import java.util.LinkedList;

public class LinkedListTest {
    public static void main(String[] args) {
        var books = new LinkedList();
        books.offer("疯狂Java讲义");
        books.push("轻量级Java EE 企业应用实战");
        books.offerFirst("疯狂Android讲义");
        for (var book :
                books) {
            System.out.println("遍历中：" + book);
        }
        System.out.println(books.peekFirst());
        System.out.println(books.peekLast());
        System.out.println(books.pop());
        System.out.println(books);
        System.out.println(books.pollLast());
        System.out.println(books);
    }
}
